<%@page import="com.ym.b2b.cache.configcache.WebAppConfig"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="b" uri="/b2b-tags"%>
<!--响应式布局 -->

<!--[if lte IE 8]><script type="text/javascript" src="/theme/default/js/ie.js?v=2.1"></script><![endif]-->		
<link rel="stylesheet" type="text/css" href="<c:url value="/views/jsp/brand/lib/css/global.css" />">
<link href="<c:url value="/views/jsp/brand/lib/css/brand.css" />" rel="stylesheet" type="text/css">
<link href="<c:url value="/views/jsp/brand/lib/css/list.css" />" rel="stylesheet" type="text/css">
<link href="<c:url value="/views/jsp/product/shoppingcart/css/select.css" />" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="<c:url value="/views/jsp/product/shoppingcart/js/jQuery-shopping.js" />"></script>

 
 <script>
setFocus(4);
</script>
<div style="margin: 0 auto;width: 1190px;">
	<div class="content w12 mt10">
		<div class="show_brand_info">
			<div class="text fl">
				<i> 
					<img class="lazy" src="#" data-original="<%=WebAppConfig.getPicPath() %>${emBBrand.smallPic}" alt="${emBBrand.brandChsName }" title="${emBBrand.brandChsName }" style="display: inline-block;">
				</i>
				<p>
					共有<strong class="red">2</strong>件商品
				</p>
			</div>
			<div class="img fr company-info">
				${emBBrand.brandDesc }
			</div>
			<div class="clear"></div>
		</div>
		
		
		<div class="shop_filter mt10">
			<div class="filter_result brand-page mt10">
				<div id="list_view" class="big_img_list">
		
		<b:showProduct limitRow="10000" outResponseAttrName="brandP" brandId="${emBBrand.brandId }" />
		<c:forEach items="${brandP.rows }" var="p1">
	<dl class="list_info goods_item_info ">
	    <dt class="info_img" productid="1">
	        <a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}" class="info_img"> 
	   			<img class="lazy" data-original="<%=WebAppConfig.getPicPath() %>${p1.middlePic}" alt="${p1.chsName }"  style="display: inline-block;">  
	        </a>
	    </dt>
	    <dd class="first_dd">
	        <p class="list_product_name">
	        	<a href="<c:url value="/product/showProductDetail.s" />?productCode=${p1.productCode}" target="_blank" class="fl productName"  >${p1.chsName }</a>
			</p>
	        <p class="none guige"><span class="no-none">规格：</span>${p1.productSpec}</p>
			 <p class="company">
	            <a href="<c:url value="/product/searchProduct.s" />?producingName=${p1.producingName}" target="_blank">${p1.producingName}</a>
	        </p>
		 	<p class="none no-none">
				<span class="no-none">库&nbsp;&nbsp;存：</span>
	        </p>
					${p1.stockNum}
	    </dd>
	    <dd class="second_dd">
	        <p class="lsj">
	        	<span class="no-none">零售价：</span><span class="rmb">￥${p1.retailPrice }</span>
	        </p>
	        <p class="none no-show"><span class="no-none">中包装：</span>${p1.middlePackageNum } ${p1.packingUnit }</p>
	       <p class="none  no-show"><span class="no-none">整件装：</span>${p1.largePackageNum } ${p1.packingUnit }</p>
		      <p class="none">
				毛利率：
					- -
	        </p>
	    </dd>
	    <dd class="dd_goods_cart">
	    	  <p class="list-login-wramp">
	            <span class="fl no-none">
	            	采购价：
				</span>
				<c:if test="${not empty sessionScope.WEB_USER_TOKEN }">
	            	${p1.salePrice }
	            </c:if>
	            <c:if test="${empty sessionScope.WEB_USER_TOKEN }">
	            	<a href="<c:url value="/views/jsp/login.jsp" />" class="login_look">登录可见</a>
	            </c:if>
	        </p>
	   
	        <div class="numbers none">
	            <div class="goods_buy_number">
	                <input type="text" value="1" name="num" class="num_input" min-num="1" base-buy-num="1" buy-unit="瓶">
	                <a href="javascript:;" class="up_btn"></a>
	                <a href="javascript:;" class="lower_btn"></a>
	            </div>
	            <span class="basis_num">
	            	<span style="margin-left:5px;">
						瓶
					</span>
					<span style="margin-left:2px;">
					</span>
	            </span>
	        </div>
	        <div class="handle mt10">
					<span class="add_cart"     >
						<input type="hidden" id="amount_${varstatus.index }"  value="1"/>
	                    <i productCode="${p1.productCode }" indexId="${varstatus.index }" amount="${p1.stockNum }" img="<%=WebAppConfig.getPicPath() %>${p1.smallPic }">加入购物车</i>
	                </span>
	            <span class="collect  loginBtn"  ></span>
	            <a href="javascript:;" class="big_show loginBtn addUserFavalit" title="${p1.chsName }" productCode="${p1.productCode }">收藏</a>
	        </div>
	    </dd>
	 </dl>
</c:forEach>
	 </div>
	</div>
</div>
</div>	 
</div>
<script type="text/javascript">
$(function(){
	//飞入购物车
	$(".add_cart i").shoping();

	layer.use('extend/layer.ext.js');
	//加入收藏
	$(".addUserFavalit").click(function(){
		    	layer.prompt({title: '输入收藏备注，并确认',type: 3,val:$(this).attr("title")}, function(pass){
			    	var p = {
							"productCode":$(this).attr("productCode"),
							"notes":pass,
							"type":"product",
							"url":"/product/showProductDetail.s?productCode="+$(this).attr("productCode"),
							"objectName":$(this).attr("title")
					    	};
		    	    $.ajax({
						type:"post",
						data:p,
						dataType:"json",
						url:"<c:url value='/trade/addUserFavorites.s' />",
						success:function(data){
							if(data.code=="200"){
								layer.msg("加入收藏成功",1, {type: 1,shade: [0.2, '#ccc']});
							}else{
								layer.msg(data.result,1, {type: 8,shade: [0.2, '#ccc']});
							}
						}
			    	});
		    	});

	});
});
 
</script>
 
